#include "pv.h"

static PyObject *DISPLAY = NULL;

PyDoc_STRVAR(pv_doc,
"python visual module");

static PyObject *
pv_test(PyObject *self)
{
	printf("Hello World!\n");
	Py_RETURN_NONE;
}

static struct PyMethodDef pv_methods[] = {
	{"test", (PyCFunction)pv_test, METH_NOARGS, "test"},
	{NULL, NULL}
};

static PyModuleDef pv_module = {
	PyModuleDef_HEAD_INIT,
	"pv",
	pv_doc,
	-1,
	pv_methods
};

PyMODINIT_FUNC
PyInit_pv(void)
{
	PyObject *m;

	if (PyType_Ready(&PvEvent_Type) < 0)
		return NULL;

	m = PyModule_Create(&pv_module);
	if (m == NULL)
		return NULL;

	Py_INCREF(&PvEvent_Type);
	PyModule_AddObject(m, "event", (PyObject *)&PvEvent_Type);

	return m;
}
